package com.chj.chuji.tijie03;

import java.io.IOException;

public class StringSort {
	public static void main(String[] args) throws IOException {
//		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
//		String str;
//		while ((str = bf.readLine()) != null) { 
		String str = "A Famous Saying: Much Ado About Nothing (2012/8).";
		char[] ch = str.toCharArray();
		StringBuffer sb = new StringBuffer();
		// 字母排序
		for (int i = 0; i <= 26; i++) {
			char c = (char) (i + 'A');
			char c1 = (char) (i + 'a');
			for (int j = 0; j < ch.length; j++) {
				if (ch[j] == c || ch[j] == c1) {
					sb.append(ch[j]);
				}
			}
		}
		// 其他符号排序
		for (int i = 0; i < ch.length; i++) {
			if ((ch[i] >= 'A' && ch[i] <= 'Z') || (ch[i] >= 'a' && ch[i] <= 'z')) {
				continue;
			}
			sb.insert(i, ch[i]);
		}
		System.out.println(sb.toString());
//		A aaAAbc dFgghh: iimM nNn oooos Sttuuuy (2012/8).
//		A aaAAbc dFgghh: iimM nNn oooos Sttuuuy (2012/8).
	}

//	}
}
